I. Field of the Disclosure
The technology of the disclosure relates generally to controlling communication between components coupled via a universal serial bus (USB) compliant connection.
II. Background
Computing devices are frequently built from multiple modules that communicate with one another over some form of data bus. Additionally, one or more peripheral components may be coupled to the computing device through a connector or cable that interoperates with such a data bus. For example, a desktop computer may be coupled to a removable FLASH memory stick by plugging the memory stick into a socket or to a phone by coupling the computer and phone with a cable. Many of the data buses used to interconnect modules or peripheral components may conform to a Universal Serial Bus (USB) protocol. While there are multiple versions of the USB protocol, the most common are USB 2.0 and USB 3.0.
Within the USB protocol, a single USB compliant connector may connect a host to a device having up to thirty-two (32) endpoints. The specification for the USB protocol allows for various types of endpoints, including isochronous, interrupt, control, and bulk. Bulk data transfers are typically bursty and contain a large amount of data that is not time sensitive (for example, a print job being sent to a printer). The specification of the USB protocol mandates fairness amongst the endpoints. This fairness is implemented by providing each endpoint a slot within a microframe. Further, in USB 2.0, fairness is achieved through a round robin format, with the host polling each endpoint of a device in turn. In the case of bulk endpoints, if no data is present, then the bulk endpoint returns a NAK signal. USB 3.0 provides an alternate process by which the endpoint may return a not ready (NRDY) signal, which is stored. Then, when data is available at the bulk endpoint, the device sends an endpoint ready signal (ERDY), and the host may reschedule the transaction.
In practice, several bulk endpoints may be polled that repeatedly return NAK signals. The round robin requirement dictates that those same endpoints will be polled again even if the host knows that a different endpoint has data to transfer (for example, because that endpoint had data to transfer the last time it was polled and not all the data fit within the allocated space in the microframe). Further, such constant polling precludes entry into a low power mode. Even in USB 3.0, throughput optimizations may be made based on which endpoints have data to transfer.